package pl.edu.agh.neuraleconomy.core.experiment.filter;

import java.util.List;

import pl.edu.agh.neuraleconomy.model.exchange.Company;

public class MaxAmountCompanyFilter implements ICompanyFilter{
	private int amount;
	
	public MaxAmountCompanyFilter(int amount){
		this.amount = amount;
	}

	public List<Company> filter(List<Company> companies) {
		return companies.subList(0, Math.min(amount, companies.size()));
	}

}
